<div class="purchase_manage">
    <div nz-row nzGutter="5">
        <div nz-col nzSpan="1" style="width: 100px;">
            <label class="line-height-32-prefix">入库通知单：</label>
        </div>
        <div nz-col nzSpan="3">
            <input appHotSearch (hotSearchEmit)="submitSearch()" nz-input placeholder="请输入入库通知单" [(ngModel)]="warehousingNote" />
        </div>
        <div nz-col nzSpan="2">
            <label class="line-height-32-prefix">物料编码：</label>
        </div>
        <div nz-col nzSpan="3">
            <input appHotSearch (hotSearchEmit)="submitSearch()" nz-input placeholder="请输入物料编码" [(ngModel)]="materialEncoding"/>
        </div>
        <div nz-col nzSpan="1">
            <button nz-button nzType="primary" (click)="showModal()">...</button>
        </div>
        <div nz-col nzSpan="2">
            <label class="line-height-32-prefix">物料名称：</label>
        </div>
        <div nz-col nzSpan="3">
            <input appHotSearch (hotSearchEmit)="submitSearch()" nz-input placeholder="请输入物料名称" [(ngModel)]="materialName" />
        </div>
        <div nz-col nzSpan="3">
            <label class="line-height-32-prefix">采购订单时间：</label>
        </div>
        <div nz-col nzSpan="4">
            <nz-range-picker nzDropdownClassName="date-range" ngModel (ngModelChange)="onDateChange($event)">
            </nz-range-picker>
        </div>
    </div>
    <div nz-row nzGutter="5" class="margin-top-16">
        <div nz-col nzSpan="1" style="width: 100px;">
            <label class="line-height-32-prefix">库房：</label>
        </div>
        <div nz-col nzSpan="3">
            <nz-select nzDropdownClassName="select_custom" class="select_item" [(ngModel)]="selectedKF" (ngModelChange)="selectKF($event)" class="width-10000">
                <nz-option nzValue="" nzLabel="全部"></nz-option>
                <nz-option *ngFor="let item of kfList" [nzValue]="item.id" [nzLabel]="item.name"></nz-option>
            </nz-select>
        </div>
        <div nz-col nzSpan="2">
            <label class="line-height-32-prefix">供应商：</label>
        </div>
        <div nz-col nzSpan="3">
            <input appHotSearch (hotSearchEmit)="submitSearch()" nz-input placeholder="请输入供应商" [(ngModel)]="selectedGYS" />
        </div>
        <div nz-col nzSpan="3">
            <label class="line-height-32-prefix">PO号：</label>
        </div>
        <div nz-col nzSpan="3">
            <input appHotSearch (hotSearchEmit)="submitSearch()" nz-input placeholder="请输入PO号" [(ngModel)]="POCode" />
        </div>
        <div nz-col nzSpan="3">
            <label class="line-height-32-prefix">检验状态：</label>
        </div>
        <div nz-col nzSpan="4">
            <nz-select nzDropdownClassName="select_custom" class="select_item" [(ngModel)]="selectedJYZT" (ngModelChange)="selectJYZT($event)"
                nzPlaceHolder="Choose" class="width-10000">
                <nz-option nzValue="" nzLabel="全部"></nz-option>
                <nz-option *ngFor="let item of checkStatus index as i" [nzValue]="i" [nzLabel]="item"></nz-option>
            </nz-select>
        </div>
    </div>
    <div nz-row class="table_1">
        <nz-table #basicTable nzBordered nzTitle="接收入库信息" [nzData]="listOfData" [nzFrontPagination]="false"  nzSize="small">
            <thead>
                <tr>
                    <th>入库通知单</th>
                    <th>PO号</th>
                    <th>物料编码</th>
                    <th>物料名称</th>
                    <th>接收数量</th>
                    <th>订单数量</th>
                    <th>未接收数量</th>
                    <th>单位</th>
                    <th>单价</th>
                    <th>采购订单时间</th>
                    <!-- <th>操作</th> -->
                </tr>
            </thead>
            <tbody>
                <tr *ngFor="let data of basicTable.data" (click)="selectJSRK(data)" [class]="currentRKID==data.id?'ant-table-row ng-star-inserted active':'ant-table-row ng-star-inserted'" >
                    <td>{{ data.inCode }}</td>
                    <td>{{ data.pocode }}</td>
                    <td>{{ data.materialCode }}</td>
                    <td>{{ data.materialName }}</td>
                    <td>{{ data.receiveNumber }}</td>
                    <td>{{ data.orderNumber }}</td>
                    <td>{{ data.unreceiveNumber }}</td>
                    <td>{{ data.materialUnit }}</td>
                    <td>{{ data.materialPrice }}</td>
                    <td>{{ data.cgtime }}</td>
                    <!-- <td>
                        <button
                            [class]="currentRKID==data.id?'ant-btn ant-btn-default ant-btn-icon-only active':'ant-btn ant-btn-default ant-btn-icon-only'"
                            nz-button nzType="default" (click)="selectJSRK(data)"><i nz-icon
                                nzType="eye"></i></button>
                    </td> -->
                </tr>
            </tbody>
        </nz-table>
    </div>
    <div nz-col nzSpan="24" class="margin-top-16">
        <nz-pagination [(nzPageSize)]="pageSize" [(nzPageIndex)]="curPageIndexTable1" [nzTotal]="totalSizeTable1"
            [nzShowTotal]="totalTemplate" (nzPageIndexChange)="clickPageRK($event)" class="float-right">
        </nz-pagination>
        <ng-template #totalTemplate let-total> 总共 {{totalSizeTable1}} 条 </ng-template>
    </div>
    <!-- <div nz-row class="line_row"></div> -->
    <nz-divider style="margin-top: 64px;"></nz-divider>
    <div nz-row class="button_row">
        <button nz-button nzType="primary" (click)="showInBound(null)" *ngIf="bornRoles.detailadd">录入入库信息</button>
        <button nz-button nzType="" class="go_RK" (click)="showBox3()" *ngIf="isInBound && bornRoles.detailinto">直接入库</button>
        <button nz-button nzType="primary" (click)="showBox()" *ngIf="isCheckInBound && bornRoles.detailchkinto">请验入库</button>
        <button nz-button nzType="danger" (click)="showBox4()" *ngIf="bornRoles.detailstop">拒绝入库</button>
        <button nz-button nzType="" class="sure_RK" (click)="showBox2()" *ngIf="bornRoles.detailconf">确认入库</button>
    </div>
    <div nz-row class="table_2">
        <nz-table #rowSelectionTable nzBordered nzTitle="接收入库明细" [nzFrontPagination]="false" [nzData]="listOfAllDataReceive"  nzSize="small">
            <thead>
                <tr>
                    <th colspan="1">选择</th>
                    <th>到货日期</th>
                    <th *ngIf="!isShowInOfficeModal">生产日期</th>
                    <th *ngIf="!isShowInOfficeModal">供应商批次</th>
                    <th *ngIf="!isShowInOfficeModal">条码批次</th>
                    <ng-container *ngIf="isShowInOfficeModal; else elseTemplate">
                        <th>数量</th>
                        <th>规格</th>
                    </ng-container>
                    <ng-template #elseTemplate>
                        <th>包装数量</th>
                        <th>包装规格(公斤)</th>
                    </ng-template>
                    <th *ngIf="!isShowInOfficeModal">重量(公斤)</th>
                    <th>库区</th>   
                    <th>是否入库</th>
                    <th *ngIf="!isShowInOfficeModal && isShowCheckColumn">是否加急</th> 
                    <th *ngIf="!isShowInOfficeModal && isShowCheckColumn">检验状态</th>
                    <th *ngIf="!isShowInOfficeModal && isShowCheckColumn">检验时间</th>
                    <th *ngIf="!isShowInOfficeModal && isShowCheckColumn">处理意见</th>
                    <th>退回原因</th>
                    <th *ngIf="!isShowInOfficeModal">抽秤重量1</th>
                    <th *ngIf="!isShowInOfficeModal">抽秤重量2</th>
                    <!-- <th>打印条码</th> -->
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <tr *ngFor="let data of rowSelectionTable.data" class="thhover">
                    <td nzShowCheckbox [nzDisabled]="data.inStatus === 1" [(nzChecked)]="data.checked" (nzCheckedChange)="checkSingle(data)"></td>
                    <td>{{ data.arrivalDate }}</td>
                    <td *ngIf="!isShowInOfficeModal">{{ data.produceDate }}</td>
                    <td *ngIf="!isShowInOfficeModal">{{ data.providerBatch }}</td>
                    <td *ngIf="!isShowInOfficeModal">{{ data.barcodeBatch }}</td>
                    <!-- <td>{{ data.packageNumber }}</td> -->
                    <td>{{ isShowInOfficeModal ? data.weight : data.packageNumber }}</td>
                    <td>{{ data.packSpec }}</td>
                    <td *ngIf="!isShowInOfficeModal">{{ data.weight }}</td>
                    <td>{{ data.warehouseareaname }}</td>
                    <ng-container *ngIf="data.inStatus == 0; else elseTemplate">
                        <td>{{data.dealstatus == 0 ? "未处理" : data.dealstatus == 1 ? "直接入库" : data.dealstatus == 2 ? "请验入库" : ""}}</td>
                    </ng-container>
                    <ng-template #elseTemplate>
                        <td>{{data.dealstatus == 3 ? "拒绝入库" : "已完成入库"}}</td>
                    </ng-template>
                    <td *ngIf="!isShowInOfficeModal && isShowCheckColumn">{{ 
                        data.isexpedited == 0 ?  "否" : "是"
                    }}</td>
                    <td *ngIf="!isShowInOfficeModal && isShowCheckColumn" [class]="
                    data.checkStatus == 1 ? 'bgColor1C9ED8' 
                    : data.checkStatus == 2 ? 'bgColor008000' 
                    : data.checkStatus == 3 ? 'bgColorFF0000' 
                    : data.checkStatus == 4 ? 'bgColorFFFF00' 
                    : ''">
                        {{ data.checkStatus == 0 ? "不需要检验" 
                            : data.checkStatus == 1 ? "待检"
                            : data.checkStatus == 2 ? "合格"
                            : data.checkStatus == 3 ? "不合格"
                            : data.checkStatus == 4 ? "让步放行"
                            : "其他" }}</td>
                    <td *ngIf="!isShowInOfficeModal && isShowCheckColumn">{{ data.testauditDatetime }}</td>
                    <td *ngIf="!isShowInOfficeModal && isShowCheckColumn">{{ data.testauditRemark }}</td>
                    <td>{{ data.rejectDesc }}</td>
                    <td *ngIf="!isShowInOfficeModal">{{ data.spotweight1 }}</td>
                    <td *ngIf="!isShowInOfficeModal">{{ data.spotweight2 }}</td>
                    <!-- <td>
                        <button nz-button nzType="primary">打印条码</button>
                    </td> -->
                    <td>
                        <div nz-row>
                            <button nz-button nzType="primary" (click)="printCode()">打印条码</button>
                        </div>
                        <div nz-row class="margin-top-16" style="width: 88px;">
                            <button nz-button nzType="primary" (click)="showInBound(data)">
                                <i nz-icon nzType="edit"></i>
                            </button>
                            <button nz-button nzType="danger" class="float-right" (click)="delReceiveInfoByIds(data)">
                                <i nz-icon nzType="delete"></i>
                            </button>
                        </div>
                    </td>
                </tr>
            </tbody>
        </nz-table>
    </div>
    <div nz-col nzSpan="24" class="page_row">
        <nz-pagination [(nzPageIndex)]="currentJSRK" [nzTotal]="totalSizeJSRK" [nzShowTotal]="totalTemplateJSRK"
            (nzPageIndexChange)="clickPageJSRK($event)">
        </nz-pagination>
        <ng-template #totalTemplateJSRK let-total> 总共 {{totalSizeJSRK}} 条 </ng-template>
    </div>
</div>
<div id="modal_box"></div>
<nz-modal appDragModal [nzGetContainer]="modalDomBox" [(nzVisible)]="isShowBox1" nzTitle="友情提示" (nzOnCancel)="cancelBox1()" (nzOnOk)="okBox1()">
    <div nz-row>
        <p>{{checkFirstMsg}}</p>
    </div>
    <div nz-row>
        <div nz-col nzSpan="4">
            是否加急：
        </div>
        <div nz-col nzSpan="20">
            <nz-radio-group [(ngModel)]="isAnxious">
                <label nz-radio nzValue="1">是</label>
                <label nz-radio nzValue="0">否</label>
              </nz-radio-group>
        </div>
    </div>    
</nz-modal>
<nz-modal appDragModal [nzGetContainer]="modalDomBox" class="box2_modal" [(nzVisible)]="isShowBox2" nzTitle="入库确认" (nzOnCancel)="cancelBox2()" (nzOnOk)="okBox2()">
    <div nz-row>
        <h4 style="font-weight:bold">原材料</h4>
    </div>
    <nz-checkbox-wrapper style="width: 100%;" (nzOnChange)="materialChecked($event)" *ngIf="isShowBox2">
        <div nz-row nzGutter="16">
            <div nz-col nzSpan="12" *ngFor="let item of materialOptions"><label nz-checkbox [nzValue]="item.value">{{item.label}}</label></div>
        </div>
    </nz-checkbox-wrapper>
    <div nz-row>
        <h4 style="font-weight:bold;margin-top:10px">包装材料</h4>
    </div>
    <nz-checkbox-wrapper style="width: 100%;" (nzOnChange)="packageChecked($event)" *ngIf="isShowBox2">
        <div nz-row nzGutter="16">
            <div nz-col nzSpan="12" *ngFor="let item of packageStatus"><label nz-checkbox [nzValue]="item.value">{{item.label}}</label></div>
        </div>
    </nz-checkbox-wrapper>
</nz-modal>
<nz-modal [(nzVisible)]="isShowBox3" nzTitle="友情提示" (nzOnCancel)="cancelBox3()" (nzOnOk)="okBox3()">
    <p>确定要直接入库么？</p>
</nz-modal>
<nz-modal appDragModal [nzGetContainer]="modalDomBox" [(nzVisible)]="isShowBox4" nzTitle="拒绝入库" (nzOnCancel)="cancelBox4()" (nzOnOk)="okBox4()">
    <div nz-row>
        <div nz-col nzSpan="5">
            <p class="ant-form-item-required">拒绝原因：</p>
        </div>
        <div nz-col nzSpan="19">
            <textarea rows="4" nz-input [(ngModel)]="txtaReason" placeholder="请输入拒绝原因"></textarea>
        </div>
    </div>
</nz-modal>
<input type="hidden" [(ngModel)]="hidWarehouseId"/>
<input type="hidden" [(ngModel)]="hidWhsAreaId"/>
<nz-modal [nzStyle]="{left:'24%',top:'80px'}" appDragModal [nzGetContainer]="modalDomBox" nzTitle="入库信息" nzMaskClosable="false" [(nzVisible)]="showInMaterial" [nzOkLoading]="isOkLoading" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()" nzWidth="55%">
    <form nz-form [formGroup]="validateMaterialForm">
        <div nz-row nzGutter="16">
            <div nz-col nzSpan="12">
                <nz-form-item>
                    <nz-form-label [nzSpan]="8" nzRequired>生产日期</nz-form-label>
                    <nz-form-control [nzSpan]="16" nzErrorTip="请选择生产日期">
                        <nz-date-picker nzDropdownClassName="date-range" [nzStyle]="{'width':'100%'}" class="width-10000" formControlName="txtPdData"></nz-date-picker>
                    </nz-form-control>
                </nz-form-item>
            </div>
            <div nz-col nzSpan="12">
                <nz-form-item>
                    <nz-form-label [nzSpan]="8" nzRequired>到货日期</nz-form-label>
                    <nz-form-control [nzSpan]="16" nzErrorTip="请选择到货日期">
                        <nz-date-picker nzDropdownClassName="date-range" [nzStyle]="{'width':'100%'}" class="width-10000" formControlName="txtAdData"></nz-date-picker>
                    </nz-form-control>
                </nz-form-item>
            </div>
        </div>
        <div nz-row nzGutter="16">
            <div nz-col nzSpan="12">
                <nz-form-item>
                    <nz-form-label [nzSpan]="8" nzRequired>供应商批次</nz-form-label>
                    <nz-form-control [nzSpan]="16" nzErrorTip="请输入供应商批次">
                        <input nz-input formControlName="txtSupplierBatch" placeholder="请输入供应商批次" />
                    </nz-form-control>
                </nz-form-item>
            </div>
            <div nz-col nzSpan="12">
                <nz-form-item>
                    <nz-form-label [nzSpan]="8" nzRequired>条码批次</nz-form-label>
                    <nz-form-control [nzSpan]="16" nzErrorTip="请输入条码批次">
                        <input nz-input formControlName="txtCodeBatch" placeholder="请输入条码批次" />
                    </nz-form-control>
                </nz-form-item>
            </div>
        </div>
        <div nz-row nzGutter="16">
            <div nz-col nzSpan="12">
                <nz-form-item>
                    <nz-form-label [nzSpan]="8" nzRequired>包装数量</nz-form-label>
                    <nz-form-control [nzSpan]="16" nzErrorTip="请输入包装数量">
                        <input nz-input formControlName="txtPackNumber" placeholder="请输入包装数量" />
                    </nz-form-control>
                </nz-form-item>
            </div>
            <div nz-col nzSpan="12">
                <nz-form-item>
                    <nz-form-label [nzSpan]="8" nzRequired>包装规格(公斤)</nz-form-label>
                    <nz-form-control [nzSpan]="16" nzErrorTip="请输入包装规格">
                        <input nz-input formControlName="txtPackSpec" placeholder="请输入包装规格" />
                    </nz-form-control>
                </nz-form-item>
            </div>
        </div>
        <div nz-row nzGutter="16">
            <div nz-col nzSpan="12">
                <nz-form-item>
                    <nz-form-label [nzSpan]="8" nzRequired>重量(公斤)</nz-form-label>
                    <nz-form-control [nzSpan]="16" nzErrorTip="请输入重量">
                        <input nz-input formControlName="txtWeight" placeholder="请输入重量" />
                    </nz-form-control>
                </nz-form-item>
            </div>
            <div nz-col nzSpan="12">
                <nz-form-item>
                    <nz-form-label [nzSpan]="8">抽秤重量1</nz-form-label>
                    <nz-form-control [nzSpan]="16">
                        <input nz-input formControlName="txtCheckWeight1" placeholder="请输入抽秤重量" />
                    </nz-form-control>
                </nz-form-item>
            </div>
        </div>
        <div nz-row nzGutter="16">
            <div nz-col nzSpan="12">
                <nz-form-item>
                    <nz-form-label [nzSpan]="8" nzRequired>库房</nz-form-label>
                    <nz-form-control [nzSpan]="16" nzErrorTip="请选择库房">
                        <!-- <input nz-input formControlName="txtWhsArea" placeholder="请点击选择库区" /> -->
                        <!-- <nz-tree-select #whsAreaMaterialTree [nzDropdownStyle]="{'left' : '-200px', 'max-height': '300px' }" nzAllowClear="false" formControlName="selMaterialWhsArea" 
                        [nzNodes]="selWhsTree" nzPlaceHolder="请点击选择库区" (ngModelChange)="whsAreaChange($event)" class="width-10000"></nz-tree-select>
                        <ng-template #selMaterialTreeErrorTpl let-control>
                            <ng-container *ngIf="control.hasError('required')">请选择库区</ng-container>
                            <ng-container *ngIf="control.hasError('msgWhsAreaError')">请正确选择库区</ng-container>
                        </ng-template> -->
                        <nz-select formControlName="selMaterialWarehouse" [nzDropdownStyle]="{'left': '-200px', 'max-height': '300px'}" nzDropdownClassName="select_custom" class="select_item" (ngModelChange)="selInputKF($event)" class="width-10000">
                            <nz-option nzValue="" nzLabel="请选择"></nz-option>
                            <nz-option *ngFor="let item of materialKfList" [nzValue]="item.id" [nzLabel]="item.name"></nz-option>
                        </nz-select>
                    </nz-form-control>
                </nz-form-item>
            </div>
            <div nz-col nzSpan="12">
                <nz-form-item>
                    <nz-form-label [nzSpan]="8">抽秤重量2</nz-form-label>
                    <nz-form-control [nzSpan]="16">
                        <input nz-input formControlName="txtCheckWeight2" placeholder="请输入抽秤重量" />
                    </nz-form-control>
                </nz-form-item>
            </div>
        </div>
        <div nz-row nzGutter="16">
            <div nz-col nzSpan="12">
                <nz-form-item>
                    <nz-form-label [nzSpan]="8" nzRequired>库区</nz-form-label>
                    <nz-form-control [nzSpan]="16" nzErrorTip="请选择库区">
                        <nz-select formControlName="selMaterialWhsArea" [(ngModel)]="whsAreaId" [nzDropdownStyle]="{'left': '-200px', 'max-height': '300px'}" nzDropdownClassName="select_custom" class="select_item" class="width-10000">
                            <nz-option nzValue="" nzLabel="请选择"></nz-option>
                            <nz-option *ngFor="let item of kqList" [nzValue]="item.id" [nzLabel]="item.name"></nz-option>
                        </nz-select>
                    </nz-form-control>
                </nz-form-item>
            </div>
        </div>
    </form>
</nz-modal>
<nz-modal [nzStyle]="{left:'24%',top:'80px'}" appDragModal [nzGetContainer]="modalDomBox" nzTitle="入库信息" nzMaskClosable="false" [(nzVisible)]="showInOffice" [nzOkLoading]="isOkLoading" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()" nzWidth="55%">
    <form nz-form [formGroup]="validateOfficeForm">
        <div nz-row nzGutter="16">
            <div nz-col nzSpan="12">
                <nz-form-item>
                    <nz-form-label [nzSpan]="8" nzRequired>到货日期</nz-form-label>
                    <nz-form-control [nzSpan]="16" nzErrorTip="请输入采购周期">
                        <nz-date-picker nzDropdownClassName="date-range" [nzStyle]="{'width':'100%'}" class="width-10000" formControlName="txtAdData"></nz-date-picker>
                    </nz-form-control>
                </nz-form-item>
            </div>
            <div nz-col nzSpan="12">
                <nz-form-item>
                    <nz-form-label [nzSpan]="8" nzRequired>库房</nz-form-label>
                    <nz-form-control [nzSpan]="16" nzErrorTip="请选择库房">
                        <!-- <input nz-input formControlName="txtWhsArea" placeholder="请点击选择库区" /> -->
                        <!-- <nz-tree-select [nzDropdownStyle]="{left : '-200px', 'max-height': '300px'}" nzAllowClear="false" formControlName="selOfficeWhsArea" 
                        [nzNodes]="selWhsTree" nzPlaceHolder="请点击选择库区" (ngModelChange)="whsAreaChange($event)" class="width-10000"></nz-tree-select>
                        <ng-template #selOfficeTreeErrorTpl let-control>
                            <ng-container *ngIf="control.hasError('required')">请选择库区</ng-container>
                            <ng-container *ngIf="control.hasError('msgWhsAreaError')">请正确选择库区</ng-container>
                        </ng-template> -->
                        <nz-select formControlName="selOfficeWarehouse" [nzDropdownStyle]="{'left': '-200px', 'max-height': '300px'}" nzDropdownClassName="select_custom" class="select_item" (ngModelChange)="selInputKF($event)" class="width-10000">
                            <nz-option nzValue="" nzLabel="请选择"></nz-option>
                            <nz-option *ngFor="let item of materialKfList" [nzValue]="item.id" [nzLabel]="item.name"></nz-option>
                        </nz-select>
                    </nz-form-control>
                </nz-form-item>
            </div>
        </div>
        <div nz-row nzGutter="16">
            <div nz-col nzSpan="12">
                <nz-form-item>
                    <nz-form-label [nzSpan]="8" nzRequired>数量</nz-form-label>
                    <nz-form-control [nzSpan]="16" nzErrorTip="请输入数量">
                        <input nz-input formControlName="txtPackNumber" placeholder="请输入数量" />
                    </nz-form-control>
                </nz-form-item>
            </div>
            <div nz-col nzSpan="12">
                <nz-form-item>
                    <nz-form-label [nzSpan]="8" nzRequired>库区</nz-form-label>
                    <nz-form-control [nzSpan]="16" nzErrorTip="请选择库区">
                        <nz-select formControlName="selOfficeWhsArea" [(ngModel)]="whsAreaId" [nzDropdownStyle]="{'left': '-200px', 'max-height': '300px'}" nzDropdownClassName="select_custom" class="select_item" class="width-10000">
                            <nz-option nzValue="" nzLabel="请选择"></nz-option>
                            <nz-option *ngFor="let item of kqList" [nzValue]="item.id" [nzLabel]="item.name"></nz-option>
                        </nz-select>
                    </nz-form-control>
                </nz-form-item>
            </div>
        </div>
        <div nz-row nzGutter="16">
            <div nz-col nzSpan="12">
                <nz-form-item>
                    <nz-form-label [nzSpan]="8" nzRequired>规格</nz-form-label>
                    <nz-form-control [nzSpan]="16" nzErrorTip="请输入规格">
                        <input nz-input formControlName="txtPackSpec" placeholder="请输入规格" />
                    </nz-form-control>
                </nz-form-item>
            </div>
        </div>
    </form>
</nz-modal>
<nz-modal appDragModal [nzStyle]="{left:'28%',top:'18%'}" [nzGetContainer]="modalDomBox" nzTitle="选择物料" [(nzVisible)]="isAltVisible" (nzOnCancel)="altHandleCancel()" (nzOnOk)="altHandleOk()" nzWidth="55%">
    <div nz-row>
        <div nz-col nzSpan="4" >
            <label class="line-height-32-prefix">物料编码：</label>
        </div>
        <div nz-col nzSpan="6">
            <input type="text" [(ngModel)]="txtAltCode" nz-input placeholder="输入物料编码"/>
        </div>
        <div nz-col nzSpan="4">
            <label class="line-height-32-prefix">物料名称：</label>
        </div>
        <div nz-col nzSpan="6">
            <input type="text" [(ngModel)]="txtAltName" nz-input placeholder="输入物料名称"/>
        </div>
        <div nz-col nzSpan="4">
            <button nz-button nzType="primary" class="margin-left-16" (click)="getAltSearchData()">查询</button>
        </div>
    </div>
    <div nz-row class="margin-top-16">
        <nz-table #altBasicTable [nzData]="altListOfData" [nzFrontPagination]="false" [nzBordered]="true">
            <thead>
            <tr>
                <th>选择</th>
                <th>物料编码</th>
                <th>物料名称</th>
                <!-- <th>规格</th>
                <th>数量</th> -->
                <th>单位</th>
                <th>单价</th>
                <!-- <th>Action</th> -->
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let data of altBasicTable.data">
                <td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="altCheckSingle(data)"></td>
                <td>
                    <input type="hidden" value="{{data.id}}" />
                    <span>{{ data.code }}</span>
                </td>
                <td>{{ data.name }}</td>
                <!-- <td>{{ data.spac }}</td>
                <td>--</td> -->
                <td>{{ data.unit }}</td>
                <td>{{ data.price }}</td>
                <!-- <td>
                <a>Action 一 {{ data.name }}</a>
                <nz-divider nzType="vertical"></nz-divider>
                <a>Delete</a>
                </td> -->
            </tr>
            </tbody>
        </nz-table>
    </div>
    <div nz-row class="margin-top-16">
        <nz-pagination class="float-right" [nzPageIndex]="altPageIndex" (nzPageIndexChange)="altClickPage($event)" [nzTotal]="altTotalSize" [nzPageSize]="altPageSize" [nzSize]="'small'" [nzShowTotal]="altTotalTemplate"></nz-pagination>
        <ng-template #altTotalTemplate let-total> 总共 {{ altTotalSize }} 条 </ng-template>
    </div>
</nz-modal>